package com.yl.constant;

import com.yl.util.SUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum CalType {

    MEAN("mean", "平均值"),
    MAX("max", "最大值"),
    MIN("min", "最小值"),
    ROC("roc", "变化速率"),
    TILT("tilt", "倾斜角度");

    private String code;
    private String name;

    /**
     * 类型为前缀，计算参数为后缀，对计算进行分组
     *
     * @param params 计算参数
     */
    public String calKey(String params) {
        return SUtil.fmt(this.code, params);
    }

}
